#include "Person.h"

const char* Person::GenderDefinitions[] = { "Male", "Female", "Unknown" };


Person::Person(const string firstName,const  string lastName, int age, const eGender gender)
	: age(age), gender(gender)
{
	this->firstName = firstName;
	this->lastName  = lastName;
}

const string Person::getFirstName() const
{
	return firstName;
}

const string Person::getLastName() const
{
	return lastName;
}

void Person::toOs(ostream& os, bool isFullPrint) const
{
	const char* fGender = Person::GenderDefinitions[2];;

	if (gender == eGender::male)
	{
		fGender = Person::GenderDefinitions[0];
	}
	else if (gender == eGender::female)
	{
		fGender = Person::GenderDefinitions[1];
	}

	os << "Person={First Name=" << firstName << ", Last Name=" << lastName << ", Age=" << age << ", Gander=" << fGender << "}";
}

ostream& operator<<(ostream& os, const Person& d)
{
	d.toOs(os);

	return os;
}

bool Person::operator==(const Person& other) const
{
	return true;
}

Person::~Person()
{
}